package com.example.his.api.mis.controller.form.permission;

import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class UpdatePermissionForm {
  
  @NotNull(message = "id不能为空")
  @Min(value = 1, message = "id不能小于1")
  private int id;
  
  @NotBlank(message = "permissionName不能为空")
  @Pattern(regexp = "^[A-Z:]{1,50}$", message = "permissionName格式错误")
  private String permissionName;
  
  @NotNull(message = "moduleId不能为空")
  @Min(value = 1, message = "moduleId不能小于1")
  private int moduleId;
  
  @NotNull(message = "actionId不能为空")
  @Min(value = 1, message = "actionId不能小于1")
  private int actionId;
  
  private String remark;
}
